package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.GoodsInfoMapper;
import com.ruoyi.system.domain.GoodsInfo;
import com.ruoyi.system.service.IGoodsInfoService;

/**
 * goodsService业务层处理
 *
 * @author ruoyi
 * @date 2021-08-20
 */
@Service
public class GoodsInfoServiceImpl implements IGoodsInfoService
{
    @Autowired
    private GoodsInfoMapper goodsInfoMapper;

    /**
     * 查询goods
     *
     * @param id goods主键
     * @return goods
     */
    @Override
    public GoodsInfo selectGoodsInfoById(Long id)
    {
        return goodsInfoMapper.selectGoodsInfoById(id);
    }

    /**
     * 查询goods列表
     *
     * @param goodsInfo goods
     * @return goods
     */
    @Override
    public List<GoodsInfo> selectGoodsInfoList(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.selectGoodsInfoList(goodsInfo);
    }

    /**
     * 新增goods
     *
     * @param goodsInfo goods
     * @return 结果
     */
    @Override
    public int insertGoodsInfo(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.insertGoodsInfo(goodsInfo);
    }

    /**
     * 修改goods
     *
     * @param goodsInfo goods
     * @return 结果
     */
    @Override
    public int updateGoodsInfo(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.updateGoodsInfo(goodsInfo);
    }

    /**
     * 批量删除goods
     *
     * @param ids 需要删除的goods主键
     * @return 结果
     */
    @Override
    public int deleteGoodsInfoByIds(Long[] ids)
    {
        return goodsInfoMapper.deleteGoodsInfoByIds(ids);
    }

    /**
     * 删除goods信息
     *
     * @param id goods主键
     * @return 结果
     */
    @Override
    public int deleteGoodsInfoById(Long id)
    {
        return goodsInfoMapper.deleteGoodsInfoById(id);
    }
}